<template>
  <div>
    <ul class="hhh">
      <li class="jiti">
        <ul class="k">
          <li v-for="(s, d) in goods" class="sss" :key="d">
            {{ s }}
          </li>
          <li class="oi">
            <button class="tjsj" @click="zj">添加数据</button>
          </li>
        </ul>
      </li>
      <li class="jiti" v-for="(item) in this.arr1" :key="item.goods_id">
        <ul class="k">
          <li v-for="(a, b) in item" class="sss" :key="b">
            <lll :w="a" :r="b"></lll>
          </li>
          <li class="sss">
            <button class="tr">上传数据库</button>
            <button class="tr" @click="sc(6,item.goods_id)">
              删除
            </button>
          </li>
        </ul>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  data() {
    return {
      inp: 1,
      goods: [
        "goods_id",
        "goods_name",
        "goods_english",
        "goods_price",
        "goods_label",
        "goods_sort",
        "goods_coverimg",
        "goods_scene",
      ],
    };
  },
  methods: {
    zj() {
      this.$emit("zhengjia", {
        goods_id: "空",
        goods_name: "空",
        goods_english: "空",
        goods_price: "空",
        goods_label: "空",
        goods_sort: "空",
        goods_coverimg: "空",
        goods_scene: "空",
      });
    },
    sc(a, d, c) {
      this.$emit("shanchu", a, d, c);
    },
  },
  mounted() {},
  activated() {
    setTimeout(() => {
      document.body.scrollTop = document.documentElement.scrollTop = 0;
    }, 5);
  },

  props: ["kz", "arr1"],
  components: {
    jt: () => import("./jt.vue"),
    lll: () => import("./lll.vue"),
  },
};
</script>

<style lang=scss  scoped>
.hhh {
  list-style: none;
  width: 100%;
  height: 45px;
  li.jiti {
    width: 100%;
    height: 100%;
    background-color: rgb(248, 225, 225);
    border: 1px solid beige;
    .k {
      list-style: none;
      width: 100%;
      height: 100%;
    }
    .sss {
      width: 10%;
      height: 100%;
      background-color: rgb(243, 233, 242);
      float: left;
      text-align: center;
      overflow: hidden;
    }
    .tr {
      text-align: center;
      /* line-height: 100%; */
      margin-top: 10px;
      background-color: #fad4d4;
    }
  }
}
</style>